<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>实名认证填写信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title></title>
    <link rel="stylesheet" href="__INDEX__/css/mui.min.css">
    <script type="text/javascript" src="__INDEX__/js/jquery-1.8.3.min.js"></script>

    <link rel="stylesheet" href="https://cdn.bootcss.com/layer/2.1/skin/layer.css">
    <script src="https://cdn.bootcss.com/layer/2.1/layer.js"></script>
</head>
<style >
    .wsf-cl {
        color: #FFFFFF;
        padding-top: 10px;
        position: relative;
        top: 36%;
    }

    .uploadwsf {
        width: 100px;
        height: 100px;
        margin: 10px;
        border-radius: 18px;
    }

    .mui-input-row {
        background: #ffffff;
    }

</style>

<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="__FIR__/js/vue.js"></script>
<script src="__FIR__/js/vue.min.js"></script>
<script src="__FIR__/js/mui.min.js"></script>
<link rel="stylesheet" href="__INDEX__/css/footer.css">
<link rel="stylesheet" href="__FIR__/css/mobile-uploadImg.css">



<body>


<div id="app">
    <div class="content" style="background: #FFFFFF;">
        <div class="web-width">
            <div class="for-liucheng">
                <div class="liulist for-cur"></div>
                <div class="liulist"></div>
                <div class="liulist"></div>
                <div class="liulist"></div>
                <div class="liutextbox" style="padding: 15px;">
                    <img src="__INDEX__/images/r1@2x.png" width="100%"/>
                </div>
            </div><!--for-liucheng/-->
            <div class="ht1"></div>


            <form action="{:url('/nOne')}" onsubmit="return checkF()" enctype="multipart/form-data" method="post" class="forget-pwd">
                <div class="mui-content">

                    <div class="mui-input-row">
                        <label>真实姓名</label>
                        <input type="text" value="" name="real_name" id="user" class="mui-input-clear"
                               placeholder="请输入姓名" >
                    </div>
                    <div class="mui-input-row">
                        <label>身份证号</label>
                        <input type="text" name="user_card"  id="card" class="mui-input-clear"
                               placeholder="请输入身份证号">
                    </div>
                    <div class="mui-input-row">
                        <label>手机号码</label>
                        <input type="text" name="user_tel" id="tel" class="mui-input-clear"
                               placeholder="请输入手机号码">
                    </div>
                    <!--<div class="mui-input-row">-->
                        <!--<label>会员地址</label>-->
                        <!--<input type="text" name="user_address" class="mui-input-clear"-->
                               <!--placeholder="请输入会员地址">-->
                    <!--</div>-->

                    <div class="mui-input-row">
                        <label>上传信息</label>
                    </div>
                    <div style="margin:20px 10px;">


                        <div style="margin-top:20px;">
                            <div id="uploadImgForm2" class="uploadImgStyle2">
                                <div class="mbupload_frame" id="imageBgc2"
                                     style="background:url(__FIR__/img/fm.png) no-repeat 50% 50%;">
                                    <div class="mbupload_photoList">
                                        <ul>
                                            <li class="mbupload_on mbupload_addPic mbupload_addImg"></li>
                                        </ul>
                                        <p class="mbupload_textTip mbupload_f12">上传身份证反面图</p>
                                    </div>
                                    <div class="mbupload_bgimg">
                                        <div class="iconSendImg mbupload_addImg"><input type="file" name="img2"
                                                                                        ref="image2"
                                                                                        @change="uploadImgs(2)">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div style="margin-top:20px;">
                            <div id="uploadImgForm3" class="uploadImgStyle2">
                                <div class="mbupload_frame" id="imageBgc3"
                                     style="background:url(__FIR__/img/zm.png) no-repeat 50% 50%;">
                                    <div class="mbupload_photoList">
                                        <ul>
                                            <li class="mbupload_on mbupload_addPic mbupload_addImg"></li>
                                        </ul>
                                        <p class="mbupload_textTip mbupload_f12">上传身份证正面图</p>
                                    </div>
                                    <div class="mbupload_bgimg">
                                        <div class="iconSendImg mbupload_addImg"><input type="file" name="chuanbushangqu"
                                                                                        ref="image3"
                                                                                        @change="uploadImgs(3)">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <button type="submit" class="mui-btn mui-btn-danger mui-btn-block">下一步</button>
                    </div>

                </div>
            </form>

        </div>
    </div>
    <div style="height: 46px;"></div>
    <br><br><br>
    {include file="common/foot"}
</div>
</body>
<script>

    function checkF(){

        var phone = $('#tel').val()
        if ($('#tel').val() == '' || $('#card').val() == '' || $('#user').val() == '')  {
            layer.msg('信息不完整!');
            return false
        }

        var reg = /^1[3|4|5|7|8][0-9]{9}$/; //验证规则
        var flag = reg.test(); //true
        if(!reg.test(phone)){
            layer.msg('手机格式不正确!');
            return false
        }

        if (app._data.imgList.length < 2){
            layer.msg('没有上传图片!');
            return false
        }

        return true
    }

    var app = new Vue({
        el: '#app',
        data() {
            return {
                user:'',
                card:'',
                tel:'',
                imgList: [],
                size: 0,
            }
        },
        methods: {
            uploadImgs(id) {
                var that = this

                console.log(that)

                if (id == 1) {
                    var imageObj1 = this.$refs.image1.files[0]
                    var fileReader = new FileReader();
                    fileReader.readAsDataURL(imageObj1);
                    fileReader.onload = function (e) {
                        $("#imageBgc1").css('background-image', 'url(' + e.target.result + ')');
                        $("#imageBgc1").css('background-size', '100%');
                        that.img1 = e.target.result
                    }
                    that.imgList.push(1)

                } else if (id == 2) {
                    var imageObj2 = this.$refs.image2.files[0]
                    var fileReader = new FileReader();
                    fileReader.readAsDataURL(imageObj2);
                    fileReader.onload = function (e) {
                        $("#imageBgc2").css('background-image', 'url(' + e.target.result + ')');
                        $("#imageBgc2").css('background-size', '100%');
                        that.img2 = e.target.result
                    }
                    that.imgList.push(2)

                } else if (id == 3) {
                    var imageObj3 = this.$refs.image3.files[0]
                    var fileReader = new FileReader();
                    fileReader.readAsDataURL(imageObj3);
                    fileReader.onload = function (e) {
                        $("#imageBgc3").css('background-image', 'url(' + e.target.result + ')');
                        $("#imageBgc3").css('background-size', '100%');
                        that.img3 = e.target.result
                    }
                    that.imgList.push(3)

                }
            },
              // var  _this=this,
            tijiaofangfa(e){

                console.log(_this.tel)
                console.log(_this.card)
                console.log(_this.user)

            },

        }
    })

</script>
</html>